/*
 *  Copyright 2007 Blandware (http://www.blandware.com)
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.blandware.atleap.webapp.form.core;

import com.blandware.atleap.webapp.form.BaseForm;
import org.apache.struts.action.ActionMapping;

import javax.servlet.http.HttpServletRequest;
import java.io.Serializable;

/**
 * <p>This form bean contains properties for pages that delete or move virtual
 * folder of objects.</p>
 * <p><a href="VirtualFolderForm.java.html"><i>View Source</i></a></p>
 * <p/>
 *
 * @author Roman Puchkovskiy <a href="mailto:roman.puchkovskiy@blandware.com">
 *         &lt;roman.puchkovskiy@blandware.com&gt;</a>
 * @version $Revision: 1.1 $ $Date: 2007/12/18 18:11:54 $
 * @struts.form name="virtualFolderForm"
 */
public class VirtualFolderForm extends BaseForm implements Serializable {

    /**
     * Initial path
     */
    protected String path;
    /**
     * New path
     */
    protected String newPath;

    /**
	 * Default empty constructor.
	 */
	public VirtualFolderForm() {
	}

    /**
     * Returns initial path.
     *
     * @return initial path
     */
    public String getPath() {
        return path;
    }

    /**
     * Sets initial path.
     *
     * @param path  path to set
     */
    public void setPath(String path) {
        this.path = path;
    }

    /**
     * Returns new path.
     *
     * @return new path
     */
    public String getNewPath() {
        return newPath;
    }

    /**
     * Sets new path.
     *
     * @param newPath   path to set
     * @struts.validator type="required"
     * @struts.validator type="mask" msgkey="core.virtualFolder.errors.newPath"
	 * @struts.validator-args arg0resource="core.virtualFolder.form.newPath"
	 * @struts.validator-var name="mask" value="^(\/)|(\/([a-zA-Z0-9\-_\040\.]+)+)$"
     */
    public void setNewPath(String newPath) {
        this.newPath = newPath;
    }

    /**
	 * @see org.apache.struts.action.ActionForm#reset(org.apache.struts.action.ActionMapping, javax.servlet.http.HttpServletRequest)
	 */
	public void reset(ActionMapping mapping, HttpServletRequest request) {
        path = null;
        newPath = null;
    }
}